# RUN: llvm-mc -triple=arc -disassemble %s | FileCheck %s 

# CHECK: add %r0, %r0, %r0 
0x00 0x20 0x00 0x00 

# CHECK: add %r4, %r0, %r0 
0x00 0x20 0x04 0x00 

# CHECK: add.f %r4, %r0, %r0
0x00 0x20 0x04 0x80

# CHECK: add %r2, %r0, %r3 
0x00 0x20 0xc2 0x00

# CHECK: add %r2, %r0, %r4 
0x00 0x20 0x02 0x01 

# CHECK: add %r2, %r7, %r4 
0x00 0x27 0x02 0x01 

# CHECK: add.eq %r0, %r0, 1
0xc0 0x20 0x61 0x00

# CHECK: add.lt %r6, %r6, 16
0xc0 0x26 0x2b 0x04

# CHECK: add.le %r15, %r15, 31
0xc0 0x27 0xec 0x17

# CHECK: add.gt %r0, %r0, 1
0xc0 0x20 0x69 0x00

# CHECK: add.ge %r6, %r6, 16
0xc0 0x26 0x2a 0x04

# CHECK: add.p %r15, %r15, 31
0xc0 0x27 0xe3 0x17

# CHECK: add.n %r0, %r0, 1
0xc0 0x20 0x64 0x00

# CHECK: add.vs %r6, %r6, 16
0xc0 0x26 0x27 0x04

# CHECK: add.pnz %r15, %r15, 31
0xc0 0x27 0xef 0x17

# CHECK: add.eq.f %r0, %r0, 1
0xc0 0x20 0x61 0x80

# CHECK: add.lt.f %r6, %r6, 16
0xc0 0x26 0x2b 0x84

# CHECK: add.le.f %r15, %r15, 31
0xc0 0x27 0xec 0x97

# CHECK: add.gt.f %r0, %r0, 1
0xc0 0x20 0x69 0x80

# CHECK: add.ge.f %r6, %r6, 16
0xc0 0x26 0x2a 0x84

# CHECK: add.p.f %r15, %r15, 31
0xc0 0x27 0xe3 0x97

# CHECK: add.n.f %r0, %r0, 1
0xc0 0x20 0x64 0x80

# CHECK: add.vs.f %r6, %r6, 16
0xc0 0x26 0x27 0x84

# CHECK: add.pnz.f %r15, %r15, 31
0xc0 0x27 0xef 0x97

# CHECK: and %r2, %r7, %r4 
0x04 0x27 0x02 0x01 

# CHECK: and.f %r2, %r7, %r4
0x04 0x27 0x02 0x81

# CHECK: and %r2, %r7, 4 
0x44 0x27 0x02 0x01 

# CHECK: and %r1, %r1, 255
0x84 0x21 0xc3 0x0f

# CHECK: and.f %r1, %r1, 255
0x84 0x21 0xc3 0x8f

# CHECK: and.eq %r0, %r0, 0
0xc4 0x20 0x21 0x00

# CHECK: and.lt %r6, %r6, 16
0xc4 0x26 0x2b 0x04

# CHECK: and.le %r15, %r15, 31
0xc4 0x27 0xec 0x17

# CHECK: and.gt %r0, %r0, 0
0xc4 0x20 0x29 0x00

# CHECK: and.ge %r6, %r6, 16
0xc4 0x26 0x2a 0x04

# CHECK: and.p %r15, %r15, 31
0xc4 0x27 0xe3 0x17

# CHECK: and.n %r0, %r0, 0
0xc4 0x20 0x24 0x00

# CHECK: and.vs %r6, %r6, 16
0xc4 0x26 0x27 0x04

# CHECK: and.pnz %r15, %r15, 31
0xc4 0x27 0xef 0x17

# CHECK: and.eq.f %r0, %r0, 0
0xc4 0x20 0x21 0x80

# CHECK: and.lt.f %r6, %r6, 16
0xc4 0x26 0x2b 0x84

# CHECK: and.le.f %r15, %r15, 31
0xc4 0x27 0xec 0x97

# CHECK: and.gt.f %r0, %r0, 0
0xc4 0x20 0x29 0x80

# CHECK: and.ge.f %r6, %r6, 16
0xc4 0x26 0x2a 0x84

# CHECK: and.p.f %r15, %r15, 31
0xc4 0x27 0xe3 0x97

# CHECK: and.n.f %r0, %r0, 0
0xc4 0x20 0x24 0x80

# CHECK: and.vs.f %r6, %r6, 16
0xc4 0x26 0x27 0x84

# CHECK: and.pnz.f %r15, %r15, 31
0xc4 0x27 0xef 0x97

# CHECK: asl %r1, %r1, 2 
0x40 0x29 0x81 0x00 

# CHECK: asl %r0, %r0, %r0
0x00 0x28 0x00 0x00

# CHECK: asl.f %r0, %r0, %r0
0x00 0x28 0x00 0x80

# CHECK: asr %r1, %r2, 31
0x42 0x2a 0xc1 0x07

# CHECK: asr.f %r1, %r2, 31
0x42 0x2a 0xc1 0x87

# CHECK: asr %r1, %r3, 7
0x42 0x2b 0xc1 0x01

# CHECK: asr %r1, %r1, %r2
0x02 0x29 0x81 0x00

# CHECK: max %r0, %r2, %r1
0x08 0x22 0x40 0x00

# CHECK: max %r0, %r1, 15
0x48 0x21 0xc0 0x03

# CHECK: max %r0, %r2, 4000
0x08 0x22 0x80 0x0f 0x00 0x00 0xa0 0x0f

# CHECK: max %r2, %r2, 255
0x88 0x22 0xc3 0x0f

# CHECK: or %r18, %r16, 61440
0x05 0x20 0x92 0x2f 0x00 0x00 0x00 0xf0

# CHECK: or.f %r18, %r16, 61440
0x05 0x20 0x92 0xaf 0x00 0x00 0x00 0xf0

# CHECK: or %r1, %r1, %r14
0x05 0x21 0x81 0x03

# CHECK: or %r1, %r14, %r1
0x05 0x26 0x41 0x10

# CHECK: or %r1, %r1, 128
0x85 0x21 0x02 0x00

# CHECK: sub %sp, %fp, 92
0x02 0x23 0x9c 0x3f 0x00 0x00 0x5c 0x00

# CHECK: sub %r2, %r7, %r4 
0x02 0x27 0x02 0x01 

# CHECK: sub.f %r2, %r7, %r4
0x02 0x27 0x02 0x81

# CHECK: sub %r0, %r22, %r0
0x02 0x26 0x00 0x20

# CHECK: sub1 %r3, %fp, %r1
0x17 0x23 0x43 0x30

# CHECK: sub2 %r3, %fp, 17
0x58 0x23 0x43 0x34

# CHECK: sub3 %fp, %fp, -1
0x99 0x23 0xff 0x3f

# CHECK: sub3.f %fp, %fp, -1
0x99 0x23 0xff 0xbf

# CHECK: rsub.ne %r0, %r0, 31
0xce 0x20 0xe2 0x07

# CHECK: rsub.eq %r0, %r0, 1
0xce 0x20 0x61 0x00

# CHECK: rsub.lt %r6, %r6, 16
0xce 0x26 0x2b 0x04

# CHECK: rsub.le %r15, %r15, 31
0xce 0x27 0xec 0x17

# CHECK: rsub.gt %r0, %r0, 1
0xce 0x20 0x69 0x00

# CHECK: rsub.ge %r6, %r6, 16
0xce 0x26 0x2a 0x04

# CHECK: rsub.p %r15, %r15, 31
0xce 0x27 0xe3 0x17

# CHECK: rsub.n %r0, %r0, 1
0xce 0x20 0x64 0x00

# CHECK: rsub.vs %r6, %r6, 16
0xce 0x26 0x27 0x04

# CHECK: rsub.pnz %r15, %r15, 31
0xce 0x27 0xef 0x17

# CHECK: rsub.ne.f %r0, %r0, 31
0xce 0x20 0xe2 0x87

# CHECK: rsub.eq.f %r0, %r0, 1
0xce 0x20 0x61 0x80

# CHECK: rsub.lt.f %r6, %r6, 16
0xce 0x26 0x2b 0x84

# CHECK: rsub.le.f %r15, %r15, 31
0xce 0x27 0xec 0x97

# CHECK: rsub.gt.f %r0, %r0, 1
0xce 0x20 0x69 0x80

# CHECK: rsub.ge.f %r6, %r6, 16
0xce 0x26 0x2a 0x84

# CHECK: rsub.p.f %r15, %r15, 31
0xce 0x27 0xe3 0x97

# CHECK: rsub.n.f %r0, %r0, 1
0xce 0x20 0x64 0x80

# CHECK: rsub.vs.f %r6, %r6, 16
0xce 0x26 0x27 0x84

# CHECK: rsub.pnz.f %r15, %r15, 31
0xce 0x27 0xef 0x97
